package com.aidex.system.service.impl;

import java.util.List;

import com.aidex.system.domain.VCsisBusinessUnpacking;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.framework.cache.DeptUtils;
import com.aidex.framework.cache.UserUtils;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.aidex.system.mapper.VInternationalUnpackingMapper;
import com.aidex.system.domain.VInternationalUnpacking;
import com.aidex.system.service.VInternationalUnpackingService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 国际开箱数据Service业务层处理
 * @author wll
 * @email wll
 * @date 2021-10-14
 */
@Service
@Transactional(readOnly = false)
public class VInternationalUnpackingServiceImpl extends BaseServiceImpl<VInternationalUnpackingMapper, VInternationalUnpacking> implements VInternationalUnpackingService
{
    private static final Logger log = LoggerFactory.getLogger(VInternationalUnpackingServiceImpl.class);

    /**
     * 获取单条数据
     * @param vInternationalUnpacking 国际开箱数据
     * @return 国际开箱数据
     */
    @Override
    public VInternationalUnpacking get(VInternationalUnpacking vInternationalUnpacking)
    {
        VInternationalUnpacking dto = super.get(vInternationalUnpacking);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 国际开箱数据id
     * @return 国际开箱数据
     */
    @Override
    public VInternationalUnpacking get(String id)
    {
        VInternationalUnpacking dto = super.get(id);
        return dto;
    }


    /**
     * 查询国际开箱数据列表
     * @param vInternationalUnpacking 国际开箱数据
     * @return 国际开箱数据
     */
    @Override
    public List<VInternationalUnpacking> findList(VInternationalUnpacking vInternationalUnpacking)
    {
        return super.findList(vInternationalUnpacking);
    }

    /**
     * 分页查询国际开箱数据列表
     * @param vInternationalUnpacking 国际开箱数据
     * @return 国际开箱数据
     */
    @Override
    public PageInfo<VInternationalUnpacking> findPage(VInternationalUnpacking vInternationalUnpacking)
    {
        return super.findPage(vInternationalUnpacking);
    }

    /**
     * 保存国际开箱数据
     * @param vInternationalUnpacking
     * @return 结果
     */
    @Override
    public boolean save(VInternationalUnpacking vInternationalUnpacking)
    {
        return super.save(vInternationalUnpacking);
    }


    /**
     * 删除国际开箱数据信息
     * @param vInternationalUnpacking
     * @return 结果
     */
    @Override
    public boolean remove(VInternationalUnpacking vInternationalUnpacking)
    {
        return super.remove(vInternationalUnpacking);
    }

    /**
     * 批量删除国际开箱数据
     * @param ids 需要删除的国际开箱数据ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteVInternationalUnpackingByIds(String[] ids)
    {
        return mapper.deleteVInternationalUnpackingByIds(ids);
    }

    @Override
    public VInternationalUnpacking getByWaybillNo(String waybillNo) {
        VInternationalUnpacking param = new VInternationalUnpacking();
        param.setMwbno(waybillNo);
        List<VInternationalUnpacking> list = this.findList(param);
        if (list == null || list.isEmpty()) {
            return null;
        }
        return list.get(0);
    }

}
